using System;
using System.Xml;
using System.Xml.Serialization;

namespace gtalk.Users
{
	/// <summary>
	/// Description of SMSUser.
	/// </summary>
	[System.Xml.Serialization.XmlRoot (ElementName = "User")]
    public class User
    {
        public event UserHandler UserUpdated;

		private string userName = "";
		private string sign = "";
        private agsXMPP.protocol.iq.roster.RosterItem rosterItem = null;
        
		[System.Xml.Serialization.XmlElementAttribute("UserName")]
		public string UserName
		{
			get { return this.userName; }
			set {
                this.userName = value;
                if (!object.Equals(this.UserUpdated, null))
                    this.UserUpdated(this);
            }
		}

		[System.Xml.Serialization.XmlElementAttribute("Sign")]
		public string Sign
		{
            get { return this.sign; }
            set {
                this.sign = value;
                if (!object.Equals(this.UserUpdated, null))
                    this.UserUpdated(this);
            }
		}

        [System.Xml.Serialization.XmlIgnoreAttribute]
        public agsXMPP.protocol.iq.roster.RosterItem RosterItem
        {
            get { return this.rosterItem; }
            set { this.rosterItem = value; }
        }

		public User()
		{
		}

        public User(string userName, string sign)
		{
			this.userName = userName;
            this.sign = sign;
		}
	}
}
